/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model.Entity.Web;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author user12
 */
@Entity
@Table(name = "WEB_VOTE_QUESTION")
@NamedQueries({
    @NamedQuery(name = "WebVoteQuestion.findAll", query = "SELECT w FROM VoteQuestion w"),
    @NamedQuery(name = "WebVoteQuestion.findByVoteId", query = "SELECT w FROM VoteQuestion w WHERE w.voteId = :voteId"),
    @NamedQuery(name = "WebVoteQuestion.findByVoteSubjectAr", query = "SELECT w FROM VoteQuestion w WHERE w.voteSubjectAr = :voteSubjectAr"),
    @NamedQuery(name = "WebVoteQuestion.findByVoteSubjectEn", query = "SELECT w FROM VoteQuestion w WHERE w.voteSubjectEn = :voteSubjectEn"),
    @NamedQuery(name = "WebVoteQuestion.findByVoteQuestionAr", query = "SELECT w FROM VoteQuestion w WHERE w.voteQuestionAr = :voteQuestionAr"),
    @NamedQuery(name = "WebVoteQuestion.findByVoteQuestionEn", query = "SELECT w FROM VoteQuestion w WHERE w.voteQuestionEn = :voteQuestionEn"),
    @NamedQuery(name = "WebVoteQuestion.findByVoteType", query = "SELECT w FROM VoteQuestion w WHERE w.voteType = :voteType"),
    @NamedQuery(name = "WebVoteQuestion.findByVoteStatus", query = "SELECT w FROM VoteQuestion w WHERE w.voteStatus = :voteStatus"),
    @NamedQuery(name = "WebVoteQuestion.findByStartDate", query = "SELECT w FROM VoteQuestion w WHERE w.startDate = :startDate"),
    @NamedQuery(name = "WebVoteQuestion.findByEndDate", query = "SELECT w FROM VoteQuestion w WHERE w.endDate = :endDate"),
    @NamedQuery(name = "WebVoteQuestion.findByEntryDate", query = "SELECT w FROM VoteQuestion w WHERE w.entryDate = :entryDate")})
public class VoteQuestion implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "VOTE_ID")
    private BigDecimal voteId;
    @Size(max = 200)
    @Column(name = "VOTE_SUBJECT_AR")
    private String voteSubjectAr;
    @Size(max = 200)
    @Column(name = "VOTE_SUBJECT_EN")
    private String voteSubjectEn;
    @Size(max = 2000)
    @Column(name = "VOTE_QUESTION_AR")
    private String voteQuestionAr;
    @Size(max = 2000)
    @Column(name = "VOTE_QUESTION_EN")
    private String voteQuestionEn;
    @Column(name = "VOTE_TYPE")
    private Integer voteType;
    @Column(name = "VOTE_STATUS")
    private Integer voteStatus;
    @Column(name = "START_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date startDate;
    @Column(name = "END_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date endDate;
    @Column(name = "ENTRY_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date entryDate;

    public VoteQuestion() {
    }

    public VoteQuestion(BigDecimal voteId) {
        this.voteId = voteId;
    }

    public BigDecimal getVoteId() {
        return voteId;
    }

    public void setVoteId(BigDecimal voteId) {
        this.voteId = voteId;
    }

    public String getVoteSubjectAr() {
        return voteSubjectAr;
    }

    public void setVoteSubjectAr(String voteSubjectAr) {
        this.voteSubjectAr = voteSubjectAr;
    }

    public String getVoteSubjectEn() {
        return voteSubjectEn;
    }

    public void setVoteSubjectEn(String voteSubjectEn) {
        this.voteSubjectEn = voteSubjectEn;
    }

    public String getVoteQuestionAr() {
        return voteQuestionAr;
    }

    public void setVoteQuestionAr(String voteQuestionAr) {
        this.voteQuestionAr = voteQuestionAr;
    }

    public String getVoteQuestionEn() {
        return voteQuestionEn;
    }

    public void setVoteQuestionEn(String voteQuestionEn) {
        this.voteQuestionEn = voteQuestionEn;
    }

    public Integer getVoteType() {
        return voteType;
    }

    public void setVoteType(Integer voteType) {
        this.voteType = voteType;
    }

    public Integer getVoteStatus() {
        return voteStatus;
    }

    public void setVoteStatus(Integer voteStatus) {
        this.voteStatus = voteStatus;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(Date entryDate) {
        this.entryDate = entryDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (voteId != null ? voteId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VoteQuestion)) {
            return false;
        }
        VoteQuestion other = (VoteQuestion) object;
        if ((this.voteId == null && other.voteId != null) || (this.voteId != null && !this.voteId.equals(other.voteId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.WebVoteQuestion[ voteId=" + voteId + " ]";
    }
    
}
